# Maintainer: CYBERDEViL <cyberdevilnl at protonmail dot com>
pkgname=libwwt
pkgver="3.05a"
pkgrel=1
pkgdesc="lib build from wit's wwt"
arch=("any")
url="https://notabug.org/CYBERDEViL/libwwt"
license=("GPL3")
depends=("bzip2" "glibc" "openssl" "ncurses" "zlib")
optdepends=()
makedepends=("git" "gcc" "binutils" "ncurses" "zlib" "openssl")
source=("${pkgname}::git+${url}"
        "wiimms-iso-tools::git+https://github.com/Wiimm/wiimms-iso-tools.git")
sha256sums=("SKIP" "SKIP")

prepare() {
  cd "${srcdir}/${pkgname}"
  git submodule init
  git config submodule.wiimms-iso-tools.url "${srcdir}/wiimms-iso-tools"
  git -c protocol.file.allow=always submodule update
}

build() {
  cd "$srcdir/$pkgname"
  make shared
}

package() {
  cd "$srcdir/$pkgname"
  make DESTDIR="$pkgdir/" PREFIX="usr/" install
}
